package com.zxjbyte.yiyi.server.domain.param;

import io.swagger.v3.oas.annotations.Parameter;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 演示get请求方式，入参使用类封装
 * @Author zhangxingjia
 * @Date 2023/3/1 18:45
 * @Version: 1.0
 */
@Getter
@Setter
public class DemoGetParamParam {

    @Parameter(description = "id", required = true)
    @NotNull(message = "id不可为空")
    private Long id;

    @Parameter(description = "名字", required = true)
    @NotBlank(message = "名字不可以未空")
    private String name;

    @Parameter(description = "日期", required = true)
    @NotNull(message = "日期不可为空")
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private Date time;

    private List<DemoGetParamParam> list;
}
